<script setup>

import {computed, defineProps,defineEmits} from "vue";
import FormsCountBtn from "@/components/FormsCountBtn.vue";
import CommonTagDisplay from "@/components/WordFormedTag/CommonTagDisplay.vue";
import FormCountTagNormal from "@/components/WordFormedTag/FormCountTagNormal.vue";

const theProps = defineProps(["label","pickedDoneClosableSw"]);
const emits = defineEmits(["closeTag"]);
function closeTagFunc(){
  emits("closeTag",theProps.label);
}
</script>

<template>
<!--  <el-tag v-if="!pickedDoneClosableSw" class="pickedDoneFormCountTagClosable" :style="styleObject" @click="console.log(`a el-tag clicked`)">-->
  <FormsCountBtn v-if="!pickedDoneClosableSw" :label="label" @click="console.log(`a el-tag clicked`)">
      <CommonTagDisplay :label="label" />
  </FormsCountBtn>
  <FormCountTagNormal v-else :label="label" :pickedDoneClosableSw="pickedDoneClosableSw" @closeTag="closeTagFunc" >
  </FormCountTagNormal>
<!--  </el-tag>-->
<!--  <el-tag v-else closable class="pickedDoneFormCountTagClosable" @close="closeTagFunc" :style="styleObject">-->
<!--      <CommonTagDisplay :label="label" />-->
<!--  </el-tag>-->
</template>

<style scoped>

</style>